package org.wang.generalcode.modules.exam.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.wang.generalcode.modules.exam.converter.GradeInfoConverter;
import org.wang.generalcode.modules.exam.mapper.GradeInfoMapper;
import org.wang.generalcode.modules.exam.pojo.entity.GradeInfoEntity;
import org.wang.generalcode.modules.exam.pojo.param.GradeInfoParams;
import org.wang.generalcode.modules.exam.pojo.vo.GradeInfoVO;
import org.wang.generalcode.modules.exam.service.GradeInfoService;
import org.wang.generalcode.support.base.BaseServiceImpl;

import java.util.List;

/**
 * 年级信息表服务实现类
 *
 * @author wz
 * @since 2024-11-20
 */
@Service
@RequiredArgsConstructor
public class GradeInfoServiceImpl extends BaseServiceImpl<GradeInfoMapper, GradeInfoEntity> implements GradeInfoService {

    private final GradeInfoConverter gradeinfoConverter;

    /**
     * 获取年级信息表分页列表
     *
     * @param queryParams 查询参数
     * @return {@link IPage<GradeInfoVO>} 年级信息表分页列表
     */
    @Override
    public IPage<GradeInfoVO> getGradeInfoPage(IPage<GradeInfoVO> page, GradeInfoParams queryParams) {
        return page.setRecords(baseMapper.getGradeInfoPage(page, queryParams));
    }

    @Override
    public List<GradeInfoVO> getGradeInfoList(GradeInfoParams queryParams) {
        return baseMapper.getGradeInfoList(queryParams);
    }
}
